package jpm.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.persistence.*;
import static javax.persistence.FetchType.*;
import static javax.persistence.CascadeType.*;

@Entity
public class Platform implements Serializable
{
	@Id
	private String id;
	@ManyToMany(fetch=EAGER, cascade={MERGE, PERSIST, REFRESH})
	private List<JSR> jsrs;
	public Platform () {
	}
	public Platform (String id) {
		setId(id);
	}
	public Platform (String id, JSR... jsrs) {
		this(id);
		setJsrs(new ArrayList<JSR>(Arrays.asList(jsrs)));
	}
	public String getId () {
		return this.id;
	}
	public void setId (String id) {
		this.id = id;
	}
	public List<JSR> getJsrs () {
		return jsrs;
	}
	public void setJsrs (List<JSR> jsrs) {
		this.jsrs = jsrs;
	}
}
